Skip to content

fix: plugin installs actually refresh content — add-then-always-update - #39

Merged
zheng-weihao merged 1 commit into
orbcli:mainfrom
zheng-weihao:fix/install-refresh-model
Aug 14, 2026
Merged

fix: plugin installs actually refresh content — add-then-always-update#39
zheng-weihao merged 1 commit into
orbcli:mainfrom
zheng-weihao:fix/install-refresh-model

Conversation

@zheng-weihao

Copy link
Copy Markdown
Member

What changed

Fixes silent stale-plugin installs: every agent CLI exits 0 on marketplace add of an already-registered marketplace without refreshing its snapshot, so the installer's add && return 0; update fallback never ran — reinstalls (including --force) reported success while installing stale content.

  • *_marketplace_ensure is now add-then-always-update. claude/qoder: add || true + unconditional marketplace update. codex: upgrade gated on SOURCE_TYPE (git-only; path-backed marketplaces read live), with add's exit code propagated on the path branch so a refused add stays visible.
  • --force is now a full reset (remove plugin + marketplace → re-add → reinstall), gated on source reachability (git ls-remote through the retry chain) so an offline --force preserves the existing install instead of destroying it.
  • --replace-marketplace removed (never shipped): a colliding add re-points on most CLIs, and the one refused direction is covered by --force.
  • opencode: plain install always refreshes (no skip); --force wipes the skill directory (guarded, in-namespace); file copies are atomic.
  • plugin uninstall -y dropped (the flag only skips --prune's prompt, which a bare uninstall never triggers); reset/uninstall commands are non-interactive (</dev/null), and removal output stays visible.
  • Tests: refresh-on-existing coverage per CLI, codex gate/refusal, force reset sequences, offline skip, opencode behaviors; chain-rotation mock made state-aware.
  • Docs: README/USAGE/CHANGELOG (BREAKING entries + removal), try.sh cleanup hint, concurrency note (marketplace snapshot is per-user global state).

Checklist

  • shellcheck orbit.sh install.sh passes
  • bats tests/ passes (386/386)
  • New features include tests
  • Documentation updated (README/USAGE/CHANGELOG/try.sh)

- the three *_marketplace_ensure helpers ran `add && return 0; update`,
  but every agent CLI exits 0 on `marketplace add` of an already-registered
  marketplace without refreshing its snapshot — update was dead code, and
  reinstalls (incl. --force) silently installed stale content
- claude/qoder: `add || true` + unconditional `marketplace update`
- codex: gate `upgrade` on SOURCE_TYPE (it is git-only and errors on
  path-backed marketplaces, which read live) and propagate add's exit code
  on the path branch so a refused add (git->path switch) stays visible
- --force is now a full reset (remove plugin + marketplace, re-add,
  reinstall); teardown is gated on source reachability (git ls-remote via
  net_run) so an offline --force preserves the existing install instead of
  destroying it
- remove --replace-marketplace (never shipped): a colliding add re-points
  on most CLIs, and the one refused direction is covered by --force
- opencode: plain install no longer skips; --force wipes the skill
  directory (guarded, in-namespace); file copies are atomic (tmp + mv)
- drop -y from plugin uninstall (it only skips --prune's prompt, which a
  bare uninstall never triggers); reset/uninstall commands read stdin from
  /dev/null; removal output stays visible
- marketplace warning names the failing op pair per CLI (add/update vs
  add/upgrade)
- tests: refresh-on-existing cases per CLI, codex gate/refusal, force
  reset sequences, offline skip, opencode behaviors; chain-rotation mock
  made state-aware; warning-text assertions updated
- docs: README/USAGE/CHANGELOG (BREAKING entries + removal), try.sh
  opencode cleanup hint, concurrency note (snapshot is per-user global)

Signed-off-by: Zheng Weihao <zheng-weihao@outlook.com>
@zheng-weihao
zheng-weihao merged commit da6aa98 into orbcli:main Aug 14, 2026
2 checks passed
@zheng-weihao
zheng-weihao deleted the fix/install-refresh-model branch August 24, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant